From: Eli Zaretskii Date: Tue, 27 Apr 2004 12:44:42 +0000 (+0000) Subject: (archive-maybe-copy): If ARCHIVE includes leading X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22892 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0e396c757aad27e338cc4bee92da847ace9f77a4;p=emacs.git (archive-maybe-copy): If ARCHIVE includes leading directories, make sure they exist under archive-tmpdir. --- diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 7ac7a402c3a..2cb20b4545d 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -815,6 +815,14 @@ using `make-temp-file', and the generated name is returned." (or (and archive-subfile-mode (aref archive-subfile-mode 0)) archive))) (make-directory archive-tmpdir t) + ;; If ARCHIVE includes leading directories, make sure they + ;; exist under archive-tmpdir. + (let ((arch-dir (file-name-directory archive))) + (if arch-dir + (make-directory (concat + (file-name-as-directory archive-tmpdir) + arch-dir) + t))) (setq archive-local-name (archive-unique-fname archive-name archive-tmpdir)) (save-restriction